package com.itheima.demo;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class GBKDemo {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s = "烧烤";
        byte[] bytes = s.getBytes("GBK");
        System.out.println(Arrays.toString(bytes));

        byte[] bytes1 = {-54,-19,-58,-84};
        String str = new String(bytes1,"GBK");
        System.out.println(str);
      /* byte[] bytes2 = {-70,-52,-25,-15,-25,-35};
       String str1 = new String(bytes2);
        System.out.println(str1);*/
    }
}
